/* ========================================================================= */
/* ------------------------------------------------------------------------- */
/*!
  \file			genopts.h
  \date			Aug 2011
  \author		TNick

  \brief		Contains the definition for GenOpts class


 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @n
 Please read ReadMe.txt and Licence.txt in root folder @n
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @n

*/
/* ------------------------------------------------------------------------- */
/* ========================================================================= */
#ifndef __GENOPTS_INC__
#define __GENOPTS_INC__
//
//
//
//
/*  INCLUDES    ------------------------------------------------------------ */

#include    <QMainWindow>
#include    <QtXml/QDomDocument>

/*  INCLUDES    ============================================================ */
//
//
//
//
/*  CLASS    --------------------------------------------------------------- */

namespace Ui {
class GenOpts;
}

/// form that ...
/**
*
*/
class GenOpts : public QMainWindow		{
	Q_OBJECT
	//
	//
	//
	//
	/*  DEFINITIONS    ----------------------------------------------------- */

	/*  DEFINITIONS    ===================================================== */
	//
	//
	//
	//
	/*  DATA    ------------------------------------------------------------ */

private:

	/// GUI components
	Ui::GenOpts *			ui;

	/// menu for load button
	QMenu *					mnu_load;

	/// current file that is loaded in Target tab
	QString					str_file_trg;

	/// default action
	QAction *				def_act;

	/*  DATA    ============================================================ */
	//
	//
	//
	//
	/*  FUNCTIONS    ------------------------------------------------------- */

public:

	/// constructor;
	explicit			GenOpts		(QWidget *parent = 0);

	/// destructor;
	~GenOpts		(void);


private slots:
	void			on_buttonBox_accepted			(void);
	void			on_loadQuerry_clicked			(void);
	void			on_EntrySelected				(void);

	void			on_saveQuerry_clicked			(void);

private:

	/// loads the content of the current file as xml file
	void			loadTargetFile					(void);

	/// loads the entry named s_name from the xml file str_file_trg
	void			getEntry						(QString s_name);

	/// reads an xml file and returns a handle
	QDomDocument *	openXMLFile						(void);

	/// looks for the target sepcified in s_name
	QDomElement 	targetByName					(
		QDomDocument *	doc_xml,
		QString			s_name
		);

	/*  FUNCTIONS    ======================================================= */
	//
	//
	//
	//


};	/*	class GenOpts	*/

/*  CLASS    =============================================================== */
//
//
//
//
#endif // __GENOPTS_INC__
/* ------------------------------------------------------------------------- */
/* ========================================================================= */
